import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";

Vue.use(VueRouter);

const router = new VueRouter({
  mode: "history",
  // base: process.env.BASE_URL,
  strict: process.env.NODE_ENV !== 'production',
  routes: [
    {
      path: "/",
      name: "home",
      component: Home 
    },
    {
      path: "/study/index",
      name: "study",
      component: () =>
        import("../views/study/index.vue")
    },
    {
      path: "/assembly/index",
      name: "assembly",
      component: () => import("../views/assembly/index.vue"),
      children: [
        {
          path: '/assembly/popbtn',
          name: 'popbtn',
          component: () => import("../views/assembly/popBtn.vue")
        },
        {
          path: '/assembly/debug',
          name: 'debug',
          component: () => import("../views/assembly/debug.vue")
        },
        {
          path: '/assembly/copy',
          name: 'copy',
          component: () => import("../views/assembly/copy.vue")
        },
        {
          path: '/assembly/createiframe',
          name: 'createiframe',
          component: () => import("../views/assembly/createIframe.vue")
        },
        {
          path: '/assembly/useragent',
          name: 'useragent',
          component: () => import("../views/assembly/useragent.vue")
        },
      ]
    }
  ]
});

export default router;
